package com.example.tutormanagement.service.impl;

import com.example.tutormanagement.mapper.SalaryMapper;
import com.example.tutormanagement.pojo.Charge;
import com.example.tutormanagement.pojo.Salary;
import com.example.tutormanagement.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalaryServiceImpl implements SalaryService {

    @Autowired
    private SalaryMapper salaryMapper;

    @Override
    public List<Salary> list() {
        return salaryMapper.list();
    }

    @Override
    public void update(Salary salary , String id) {
        salary.setPid(id);
        salaryMapper.update(salary);
    }

    @Override
    public void insert(Salary salary) {
        salaryMapper.insert(salary);
    }

    @Override
    public Salary select(String id) {
        return salaryMapper.select(id);
    }

    @Override
    public void delete(String id) {
        salaryMapper.delete(id);
    }
}
